<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			form{
				margin-left: 40%;
			}
			.tijiao{
				margin-left:10%;
			}
			input{
				margin-top: 6%;
			}
		</style>
	</head>
	<body>
		<!--<a href="http://127.0.0.1:8888/logo">跳转</a>-->
		<form action="login">
			用户:<input type="text" name="username" id="username" value="" /><br>
			密码:<input type="password" name="password" id="password" value="" /><br>
			<input type="submit" value="登录" class="tijiao"/>
		</form>
	</body>
	<script type="text/javascript">
		var btn = document.querySelector(".tijiao");
		var btn1 = document.querySelector("#username");
		var btn2 = document.querySelector("#password");
		btn.onclick = function(e){
			if(btn1.value != '' && btn2.value != ''){
				
			}else{
				e.preventDefault();
			}
		}
	</script>
</html>
